package net.asfun.jvalog.misc;

public class Caster {
	
	public static int toInt(String str) {
		return toInt(str, 0);
	}
	
	public static int toInt(String str, int defaultValue) {
		try {
			return Integer.parseInt(str);
		} catch(Exception e) {
			return defaultValue;
		}
	}

}
